package com.kimoge.spring6.aop.agent;

/**
 * @author kimoge
 * @date 2025/8/28
 * @description
 */
public class CalculatorStaticProxy implements Calculator {
    private Calculator target;

    public CalculatorStaticProxy(Calculator calculator) {
        this.target = calculator;
    }

    @Override
    public int add(int a, int b) {
        System.out.println("Adding " + a + " and " + b);
        int addResult = this.target.add(a, b);
        System.out.println("Result: " + addResult);
        return addResult;
    }

    @Override
    public int subtract(int a, int b) {
        return 0;
    }

    @Override
    public int multiply(int a, int b) {
        return 0;
    }

    @Override
    public int divide(int a, int b) {
        return 0;
    }
}
